package com.woniuxy.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.One;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.woniuxy.entity.Client;
import com.woniuxy.entity.ClientRecharge;
import com.woniuxy.entity.PickGoods;

@Mapper
public interface ClientRechargeMapper {
	@Select("select * from t_client_recharge")
	@Results({
		@Result(id=true,column="crid",property="crid"),
		@Result(column="cid",property="client",javaType =Client.class ,one=@One(select="oneClient"))
	})
	public List<ClientRecharge> all();
	
	@Select("select * from t_client where cid=#{cid}")
	public Client oneClient();
	@Update("update t_client_recharge set money=#{money},operator=#{operator} where crid=#{crid}")
	public int updateClientRecharge(ClientRecharge clientRecharge);
	
	
}
